x86: avoid deadlock after a PCI SERR NMI
authorDavid Vrabel <david.vrabel@citrix.com>
Thu, 2 Feb 2012 15:28:58 +0000 (15:28 +0000)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 2 Feb 2012 15:28:58 +0000 (15:28 +0000)
commit7d44891ccc13b842b9f135c77233d4d56720e219
tree2a9572399a1aa050dfa3e076b7f7f2b6f74b8572
parenta6b64c00c491c5e563e90bda35b2e4ccc02edb94
x86: avoid deadlock after a PCI SERR NMI

If a PCI System Error (SERR) is asserted it causes an NMI. If this NMI
occurs while the CPU is in printk() then Xen may deadlock as
pci_serr_error() calls console_force_unlock() which screws up the
console lock.

printk() isn't safe to call from NMI context so defer the diagnostic
message to a softirq.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Tested-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/traps.c
xen/include/asm-x86/softirq.h